import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';
import dataV from '@jiaminghi/data-view';
// import axios from 'axios'

Vue.use(dataV);

// 引入websocket
import { createSocket } from '@sven0706/websocket'
// 建立连接
createSocket('ws://127.0.0.1:6018')
    // 发送消息
import { sendWSPush } from '@sven0706/websocket'
Vue.prototype.$sendMg = sendWSPush
    // sendWSPush(data)
    // dc

// 按需引入vue-awesome图标
import Icon from 'vue-awesome/components/Icon';
import 'vue-awesome/icons/chart-bar.js';
import 'vue-awesome/icons/chart-area.js';
import 'vue-awesome/icons/chart-pie.js';
import 'vue-awesome/icons/chart-line.js';
import 'vue-awesome/icons/align-left.js';

// 全局注册图标
Vue.component('icon', Icon);

// 适配flex
import '@/common/flexible.js';

// 引入全局css
import './assets/scss/style.scss';


//引入echart
import * as echarts from 'echarts';
Vue.prototype.$echarts = echarts

// // 请求基准路径配置
// axios.defaults.baseURL = 'http://47.99.38.194:8090'
//     // 将axios挂载到Vue的原型对象上
//     // 在别的组件中使用 this.$http
// Vue.prototype.$http = axios


Vue.config.productionTip = false;

new Vue({
    router,
    store,
    render: (h) => h(App),
}).$mount('#app');